package com.abc.dto.response;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "文件解析结果响应")
public class FileParseResultResponse {

    @Schema(description = "响应状态：succeeded-成功，failed-失败", 
            allowableValues = {"succeeded", "failed"})
    private String status;

    @Schema(description = "响应消息", example = "结果获取成功")
    private String message;

    @Schema(description = "解析后的文本内容")
    private String content;

    @Schema(description = "解析任务ID", example = "task_123456789")
    @JSONField(name = "task_id")
    private String taskId;

    @Schema(description = "解析结果下载链接")
    @JSONField(name = "parsing_result_url")
    private String parsingResultUrl;

    @Schema(description = "下载链接（兼容字段）")
    private DownloadLinks downloadLinks;

    @Data
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Schema(description = "下载链接")
    public static class DownloadLinks {
        
        @Schema(description = "图片压缩包下载链接")
        private String imagesZip;
        
        @Schema(description = "Markdown格式下载链接")
        private String markdown;
        
        @Schema(description = "布局JSON下载链接")
        private String layoutJson;
    }
}